1. Field of the Invention
This invention relates to RAID subsystems.
2. Related Art
Redundant Array of Independent Disks (RAID) is a popular method for information storage. RAID comes in several configurations that offer advantages over using a single storage device (such as faster data transfers and an error recovery methodology).
At some point in the life of a RAID group there may be a desire to disable one or more disks in the system. RAID systems often start quite small and grow into large complex systems. As a RAID system grows, the location of its component parts can become fragmented. Location fragmentation can make administration and maintenance of a system troublesome when, for example, each disk in a RAID group is located in a different rack or a different room.
The obvious solution is to move all the components of a RAID group to one location, such as, a single rack. Generally, this requires taking the RAID or some portion of it off-line which is rarely an option.
A first known method that allows a disk to be disabled and then reactivated is often used to replace a damaged disk in a RAID group. This is often referred to as hot swapping or hot plugging. Although this method allows a disk to be inactivated and then reactivated, it suffers from a severe disadvantage. When the disk is reactivated, reconstruction of the RAID group data can take several hours, and if another disk in the group fails during this time the entire volume may be lost.
A second known method uses a change log to track any changes that take place relating to the inactivated disk in its absence. Although this method allows a disk to be inactivated and reactivated, it too suffers from a severe disadvantage. Tracking all the changes that need to be made to the inactivated disk is a very complex operation. The greater the duration between inactivation of a disk and its reactivation, the greater the likelihood that there will be more and more changes necessary. Thus, this technique has only limited value directed toward short term disabling of a disk in a RAID group.
Accordingly, it would be desirable to provide a technique for flexible disabling of disk sets that is not subject to the limitations of the known art.
The invention provides a method and system for flexible disabling of disk sets within a RAID group. In conjunction with the invention detailed in the incorporated disclosure (WAFL), the invention allows a disk to be disabled for long periods of time and then reactivated without incurring overhead (such as, required reconstruction of a RAID group).
Executing the following steps will allow a disk to be disabled. First, if WAFL is currently writing a consistency point, it should be allowed to complete the operation before continuing. Second, the disk to be inactivated is marked as xe2x80x9cread-only.xe2x80x9d At this point, the disk can be physically removed and the data that would come from the As inactivated disk is reconstructed using the remaining disks (reconstruct on read).
After a disk has been inactivated, writes continue to the RAID group using the remaining active disks in the group. Most file systems xe2x80x9cwrite in place.xe2x80x9d This means that they overwrite old data with new data. WAFL always writes to unallocated file space. According to the invention, files that are edited during inactivation of a drive are written in their entirety to active disks, thus no data reconstruction is required when an inactivated disk is reactivated.
Executing the following steps will allow a disk to be reactivated. First, the disk must be physically connected. Second, the disk is marked as xe2x80x9cread/write.xe2x80x9d At this point, the disk is operating as it was prior to being disabled.
A parity disk may be disabled in a similar fashion, however, the entire RAID group must be disabled and a mirror RAID group should be used as the read source. A RAID group cannot provide data reliably when its parity disk is inactive. When the disabled parity disk is reactivated, it must be resynchronized with its mirror before it is allowed to resume accepting requests for reading and writing data.